#!/usr/bin/env bash
echo "Creating mongo users..."
mongo admin --host localhost -u root -p 5173108646fh. --eval "db.createUser({user: 'admin', pwd: '5173108646fh.', roles: [{role: 'userAdminAnyDatabase', db: 'admin'}]});"
mongo admin -u root -p 5173108646fh. << EOF
use jiujishichang
db.createUser({user: 'fuhan1', pwd: '767129063fyy@.', roles:[{role:'readWrite',db:'jiujishichang'}]})
EOF
echo "Mongo users created."
